package com.sh.data.engine.domain.api.service;

import com.sh.data.engine.domain.api.model.domain.DataApiDomain;
import com.sh.data.engine.domain.api.model.domain.rest.DataApiHttpServletRequestPayload;
import jakarta.servlet.http.HttpServletRequest;

import java.util.Map;

public interface DataApiRestService {

    public static final String SERVLETPATH = "/restData";

    Object getResult(String apiPath, HttpServletRequest request) throws Exception;

    Object getResult(
        String apiPath,
        DataApiHttpServletRequestPayload dataApiHttpServletRequestPayload,
        HttpServletRequest request)
        throws Exception;

    Long testDataApi(DataApiDomain dataApiDomain, Map<String, String> params);

    boolean removeConfigCache(Long apiId, String apiPath);
}
